home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
rjs.lha
/
RJS
/
CmdLine
/
src
/
CmdOpt_int.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-14
|
643b
|
39 lines
#include "CmdLine.h"
#include <RJS/Convert.h>
RJS_CmdOpt_int::RJS_CmdOpt_int(const char *k, RJS_CmdOpt::CmdOptFlags f)
: RJS_CmdOpt(k,f|Value)
{
val=0;
}
RJS_CmdOpt_int::RJS_CmdOpt_int(const char *k, const RJS_String &dv, RJS_CmdOpt::CmdOptFlags f)
: RJS_CmdOpt(k,dv,f)
{
val=0;
}
int RJS_CmdOpt_int::set_value()
{
val=RJS_Convert::toInt(RJS_CmdOpt::val);
if (RJS_Convert::ok()) return 1; else return 0;
}
const char *RJS_CmdOpt_int::value_type()
{
return "integer";
}
void RJS_CmdOpt_int::reset()
{
val=0;
RJS_CmdOpt::reset();
}
void RJS_CmdOpt_int::dump()
{
RJS_CmdOpt::dump();
cout << "int: " << value() << endl;
}